package com.icemelon.catdog.controller;

import com.icemelon.catdog.pojo.Affair;
import com.icemelon.catdog.pojo.Notice;
import com.icemelon.catdog.service.UserAffairService;
import com.icemelon.catdog.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SquareController {
    @Autowired
    private UserAffairService userAffairService;
    @GetMapping("/affair")
    public Result getAllAffair(Integer id){
        List<Affair> list=userAffairService.getAllAffair(id);
        return Result.success(list);
    }
}
